package com.ruoyi.yun.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yun.mapper.YunUserRightsmenuMapper;
import com.ruoyi.yun.domain.YunUserRightsmenu;
import com.ruoyi.yun.service.IYunUserRightsmenuService;

/**
 * 权限菜单管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-24
 */
@Service
public class YunUserRightsmenuServiceImpl implements IYunUserRightsmenuService 
{
    @Autowired
    private YunUserRightsmenuMapper yunUserRightsmenuMapper;

    /**
     * 查询权限菜单管理
     * 
     * @param id 权限菜单管理主键
     * @return 权限菜单管理
     */
    @Override
    public YunUserRightsmenu selectYunUserRightsmenuById(Long id)
    {
        return yunUserRightsmenuMapper.selectYunUserRightsmenuById(id);
    }

    /**
     * 查询权限菜单管理列表
     * 
     * @param yunUserRightsmenu 权限菜单管理
     * @return 权限菜单管理
     */
    @Override
    public List<YunUserRightsmenu> selectYunUserRightsmenuList(YunUserRightsmenu yunUserRightsmenu)
    {
        return yunUserRightsmenuMapper.selectYunUserRightsmenuList(yunUserRightsmenu);
    }

    /**
     * 新增权限菜单管理
     * 
     * @param yunUserRightsmenu 权限菜单管理
     * @return 结果
     */
    @Override
    public int insertYunUserRightsmenu(YunUserRightsmenu yunUserRightsmenu)
    {
        return yunUserRightsmenuMapper.insertYunUserRightsmenu(yunUserRightsmenu);
    }

    /**
     * 修改权限菜单管理
     * 
     * @param yunUserRightsmenu 权限菜单管理
     * @return 结果
     */
    @Override
    public int updateYunUserRightsmenu(YunUserRightsmenu yunUserRightsmenu)
    {
        yunUserRightsmenu.setUpdateTime(DateUtils.getNowDate());
        return yunUserRightsmenuMapper.updateYunUserRightsmenu(yunUserRightsmenu);
    }

    /**
     * 批量删除权限菜单管理
     * 
     * @param ids 需要删除的权限菜单管理主键
     * @return 结果
     */
    @Override
    public int deleteYunUserRightsmenuByIds(Long[] ids)
    {
        return yunUserRightsmenuMapper.deleteYunUserRightsmenuByIds(ids);
    }

    /**
     * 删除权限菜单管理信息
     * 
     * @param id 权限菜单管理主键
     * @return 结果
     */
    @Override
    public int deleteYunUserRightsmenuById(Long id)
    {
        return yunUserRightsmenuMapper.deleteYunUserRightsmenuById(id);
    }
}
